package com.xgp.labblogaffter.mapper;

import com.xgp.labblogaffter.model.Speak;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface SpeakMapperExt {

    @Update("update speak set supcount = supcount + 1 where sid = #{id}")
    void addSupCountById(Integer id);

    @Select("select * from speak")
    List<Speak> findSpeaksAll();

    @Select("SELECT COUNT(*) FROM speak")
    long SpeakCount();
}
